package com.sscw.task.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.guaike.core.mybatis.plugins.BaseDAO;
import com.sscw.task.entity.UAppUserPO;
import com.sscw.task.mapper.UAppUserMapper;
import org.springframework.stereotype.Repository;

@Repository
public class UAppUserDAO extends BaseDAO<UAppUserMapper, UAppUserPO> {

    public Page<UAppUserPO> findPage(Integer pageIndex, Integer pageSize) {
        LambdaQueryWrapper<UAppUserPO> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.orderByAsc(UAppUserPO::getId);
        return getBaseMapper().selectPage(new Page<>(pageIndex, pageSize), queryWrapper);
    }
}
